package com.demo.demospringboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
public class indexController {
    /**
     * 请求根目录时自动打印在页面上一个Hello World
     * @return
     */
    @GetMapping
    public String hello(){
        return "Hello World!";
    }

    @RequestMapping("/index")
    public String getDemoHtml(){
        //此处是需要展示的html在templates下的具体路径
        return "index";
    }




//    @CrossOrigin
//    @RequestMapping(value = "/getAllStudents" ,method = RequestMethod.GET)
//    public Response getAllUsers(){
//        return  new Response(200,"查询成功",sm.getALLStudents());
//    }
}
